As user terminals are widely used, a wireless network becomes an important form in which the user terminals access the Internet. Usually, the wireless network is a Wi-Fi network. Currently, most commercial places provide public Wi-Fi to users for free use.
In the related technology, the user terminal accesses public Wi-Fi mainly in the following manners: an access manner using no password, an access manner using a verification code, and an access manner using a single password. In the access manner using no password, after obtaining a service set identifier (SSID) of the public Wi-Fi, the user terminal sends an access request to a radio access point, and the radio access point directly allows, without the need to perform verification, the user terminal to access the public Wi-Fi. In the access manner using a verification code, the user terminal needs to obtain an SSID of the public Wi-Fi and a verification code when accessing the public Wi-Fi, and sends an access request to the radio access point by using the verification code and the SSID. The radio access point verifies the verification code and the SSID, and allows, after the verification succeeds, the user terminal to access the public Wi-Fi. The verification code usually has a validity period, for example, 60 s. In the access manner using a single password, to access the public Wi-Fi, the user terminal obtains in advance an SSID and a connection password of the public Wi-Fi, and sends an access request to the radio access point by using the SSID and the connection password. The radio access point verifies the SSID and the connection password, and allows, after the verification performed by the radio access point succeeds, the user terminal to access the public Wi-Fi. The connection password is usually permanently valid.